<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<body>

<form name="" id="" action="" class="Form">
	<textarea id="wordtext" style="width:600px;"></textarea>
	<div id="wordage"></div>
	<a style="color:#fff;float:left;font-size:18px;" href="#" class="Button blueButton Button18"><strong>请输入</strong></a>
</form>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){

	var limitNum = 118;

	var pattern = '你可以输入' + limitNum + '个字符';

	$('#wordage').html(pattern);

	$('#wordtext').keyup(
		function(){

			var remain = $(this).val().length;

			if(remain > 118){

				pattern = "你最多能输入118个字符";

			}else{

				var result = limitNum - remain;

				pattern = '你输入了' + result + '个字符';

			}
			$('#wordage').html(pattern);

		}
	);

});
</script>
</body>
</html>




